/**
 * 
 */
package com.google.code.jam;

import java.util.Scanner;

import com.google.code.jam.util.FileHelper;

/**
 * @author sa
 *
 */
public class ParsingService
{
	String input;
	String[] fileLines;
	int lineptr=0;
	int tokenPtr=0;

	//List<String> fileLines=new ArrayList<String>();
	
	public ParsingService()
	{
		
	}
	
	public ParsingService(String fileName) throws Exception
	{
		this.input=FileHelper.readFile(fileName);
		fileLines=this.input.split("\\n");
	}
	
	public String nextLine()  
	{
		if(lineptr>fileLines.length-1)
			return "EOF";
		
		return fileLines[lineptr++];
	}

	//TODO not complete method
	public String nextFileToken()
	{		
		String line=nextLine();
		Scanner scn=new Scanner(line);
		scn.useDelimiter("\\n");
		scn.next();
		
		return null;
	}

}
